/*    */ package com.qmsk.business.store.salebillTotal.controller;
/*    */ 
/*    */ import com.qmsk.business.store.salebillTotal.dao.SaleBillTotalDao;
/*    */ import com.utils.basic.MapUtils;
/*    */ import com.utils.gson.out.GsonEbRst;
/*    */ import com.utils.web.RequestUtils;
/*    */ import com.utils.web.ResponseUtils;
/*    */ import java.sql.SQLException;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.apache.log4j.Logger;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.web.bind.annotation.PathVariable;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ 
/*    */ @Controller
/*    */ @RequestMapping({"saleBillTotal"})
/*    */ public class SaleBillTotalController
/*    */ {
/* 28 */   private static final Logger logger = Logger.getLogger(SaleBillTotalController.class);
/*    */ 
/*    */   @Autowired
/*    */   private SaleBillTotalDao dao;
/*    */ 
/*    */   @RequestMapping(value={"find/shopId/{shopId}/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*    */   public void getListShopId(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") String shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*    */   {
/* 49 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*    */     try {
/* 51 */       Map params = new HashMap();
/* 52 */       MapUtils.addToMap(params, "shopId", shopId);
/* 53 */       MapUtils.addToMap(params, "dtPaidStart", 
/* 54 */         RequestUtils.getDate(request, "dtPaidStart"));
/* 55 */       MapUtils.addToMap(params, "dtPaidEnd", 
/* 56 */         RequestUtils.getDate(request, "dtPaidEnd"));
/* 57 */       MapUtils.addToMap(params, "status", 
/* 58 */         RequestUtils.getInt(request, "status"));
/* 59 */       MapUtils.addToMap(params, "cardNo", 
/* 60 */         RequestUtils.getString(request, "cardNo"));
/*    */ 
/* 62 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdAndRtime(params, nPageIdx, 
/* 63 */         nPageSize);
/* 64 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*    */     } catch (SQLException e) {
/* 66 */       logger.error(e);
/* 67 */       ResponseUtils.setErrorMsgResponse(
/* 68 */         RequestUtils.getFindDataErrorMessage(request), response);
/*    */     }
/*    */   }
/*    */ 
/*    */   @RequestMapping(value={"find/shopId/{shopId}/sum"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*    */   public void getListShopIdSum(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") Long shopId)
/*    */   {
/*    */     try
/*    */     {
/* 85 */       Map params = new HashMap();
/* 86 */       MapUtils.addToMap(params, "shopId", shopId);
/* 87 */       MapUtils.addToMap(params, "dtPaidStart", 
/* 88 */         RequestUtils.getDate(request, "dtPaidStart"));
/* 89 */       MapUtils.addToMap(params, "dtPaidEnd", 
/* 90 */         RequestUtils.getDate(request, "dtPaidEnd"));
/* 91 */       MapUtils.addToMap(params, "status", 
/* 92 */         RequestUtils.getInt(request, "status"));
/* 93 */       MapUtils.addToMap(params, "cardNo", 
/* 94 */         RequestUtils.getString(request, "cardNo"));
/*    */ 
/* 96 */       GsonEbRst gsonEbRst = this.dao.getGsonOfShopIdSum(params);
/* 97 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*    */     } catch (SQLException e) {
/* 99 */       logger.error(e);
/* 100 */       ResponseUtils.setErrorMsgResponse(
/* 101 */         RequestUtils.getFindDataErrorMessage(request), response);
/*    */     }
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.store.salebillTotal.controller.SaleBillTotalController
 * JD-Core Version:    0.5.3
 */